#!/bin/bash

appname=${PWD##*/}   # to assign to a variable
appname=${appname:-/} # to correct for the case where PWD=/

if [ -e ~/aid-tar/${appname}.tar ]; then
    read -p "${appname} Data Exists"
    mkdir -p /aid
    tar -xvf ~/aid-tar/${appname}.tar -C /aid
else
    read -p "${appname} Data NOT Exists"
fi
